/*
 * @Author: wuchao66_Git 2803670835@qq.com
 * @Date: 2023-02-15 09:38:54
 * @LastEditors: wuchao66_Git 2803670835@qq.com
 * @LastEditTime: 2023-02-18 11:25:38
 * @FilePath: \t154appxg\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AEmai
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes = [
  {
    path: '/',//重定向去登录首页
    name: 'login',
    component: () => import('../views/login')
  },
  {
    path: '/main',//成功去主页面
    name: 'main',
    component: () => import('../views/main'),
    children:[{
      path:'/users',
      component: () => import('../views/user/user.vue'),
    },{
      path:'/departments',
      component: () => import('../views/department/index.vue'),
    }
  ]
  }
]
const router = new VueRouter({
  routes
})

export default router
